-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature(Write predictions to disk): Write strategies cache samples, to mirror source files organisation #324
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
melisande-c
changed the title
Mc/feat/cache pred samples
Feature(Write predictions to disk): Write strategies cache samples, to mirror source files organisation
Dec 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR got quite big sorry
This is the improved version of the
PredictionWriterCallback
since the feedback on the initial PR #189, particularly the prediction file organisation should mirror the the source files. I.e. the all the 2D samples/slices in a source file should also be grouped in the prediction files.The motivation for this set up is to unify writing to ZARR with writing to TIFF. The
WriteZarrTiles
class is still not implemented but once it is, it will allow for writing each tile directly to a ZARR file.protocol.py
containing the interfacewrite_image.py
write_tiles.py
write_tiles_zarr.py
TileCache
: used by theWriteTiles
strategySampleCache
: used by both theWriteTiles
andWriteImage
strategies.CAREamist.predict_to_disk
PredictionWriterCallback
contains a write strategy as an attribute that determines how predictions are written to disk.PredictionWriterCallback
only interacts with write strategy interface defined inprotocol.py
asWriteStrategy
protocol class.Changes Made
caches.py
protocol.py
write_image.py
write_tiles.py
write_tiles_zarr.py
write_strategy_factory.py
: write_strategies need additional paramsfilenames
andn_samples_per_file
write_strategy.py
(split into 4 files)Related Issues
Additional Notes and Examples
Include any additional notes or context that reviewers should be aware of, including snippets of code illustrating your new feature.
There are a lot of classes so see below a class diagram for clarity (copied from the included README.md).
Please ensure your PR meets the following requirements: